import {lazy} from "react";
import {ROUTERTYPE,HOMETYPE} from "../types/router.d"
import { FriendsO, HomeO, Search, SettingO } from '@react-vant/icons';

export const homePath:ROUTERTYPE[]=[
    {
        path:"/home/workbench",
        name:"Workbench",
        component:lazy(()=>import("../views/home/index/Workbench")),
        title:"首页",
        icon:FriendsO 
    }, 
    {
        path:"/home/allpaper",
        name:"Allpaper",
        component:lazy(()=>import("../views/home/allpaper/Allpaper")),
        title:"分类",
        icon:HomeO 
    }, 
    {
        path:"/home/classify",
        name:"Classify",
        component:lazy(()=>import("../views/home/classify/Classify")),
        title:"购物车",
        icon:Search 
    }, 
    {
        path:"/home/comment",
        name:"Comment",
        component:lazy(()=>import("../views/home/comment/Comment")),
        title:"我的",
        icon:HomeO
    }, 
    {
        path:"/home",
        to:"/home/workbench"
    },
]
const routes=[
    {
        path:"/home",
        name:"Home",
        component:lazy(()=>import("../views/home/Home")),
        children:homePath
    },
    {
        path:"/detail/:id",
        name:"Detail",
        component:lazy(()=>import("../views/detail/Detail")),
    },
    {
        path:"/address",
        name:"Address",
        component:lazy(()=>import("../views/address/Address")),
    },
    {
        path:"/",
        to:"/home"
    },
];
export default routes;